using System;
using System.Collections;
using Server.Items;

namespace Server.Mobiles
{
	public class SBVendorManager : SBInfo
	{
		private ArrayList m_BuyInfo;
		private IShopSellInfo m_SellInfo = new InternalSellInfo();
		private int m_Serial;

		public SBVendorManager( int serial )
		{
			if ( serial > 0 )
				m_Serial = serial;
			else
				m_Serial = int.MinValue;	// to avoid null crash in generating CommVendorDeed

			m_BuyInfo = new InternalBuyInfo( m_Serial );
		}

		public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
		public override ArrayList BuyInfo { get { return m_BuyInfo; } }

		public class InternalBuyInfo : ArrayList
		{
			public InternalBuyInfo( int serial )
			{
				Add( new GenericBuyInfo( typeof( CommVendorDeed ), 6000, 10, 0x14F0, 60, new object[] { serial } ) );
				Add( new GenericBuyInfo( typeof( BidAccountBook ), 20000, 10, 0x2254, 1260, new object[] { serial } ) );
				Add( new GenericBuyInfo( typeof( StayHomeDeed ), 2600, 10, 0x14F0, 10 ) );
			}
		}

		public class InternalSellInfo : GenericSellInfo
		{
			public InternalSellInfo()
			{
			}
		}
	}
}